package com.scoressystem.service.imply;

import com.scoressystem.mapper.ScoreMapper;
import com.scoressystem.pojo.Score;
import com.scoressystem.pojo.Student;
import com.scoressystem.service.ScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@Service
public class ScoreServiceimpl implements ScoreService {
    @Autowired
    ScoreMapper scoreMapper;
    @Override
    public List<Score> selectAllScore(Map<String,Object> map) {
        return scoreMapper.selectAllScore(map);
    }

    @Override
    public long selectAllScoreCount(Map<String, Object> map) {
        return scoreMapper.selectAllScoreCount(map);
    }

    @Override
    public int selectScoreByNameAndscore(Score score) {
        return scoreMapper.selectScoreByNameAndscore(score);
    }

    @Override
    public int insertScore(Score score) {
        return scoreMapper.insertScore(score);
    }

    @Override
    public int searchAllById(Score score) {
        return scoreMapper.searchAllById(score);
    }

    @Override
    public int deleteById(Score score) {
        return scoreMapper.deleteById(score);
    }

    @Override
    public int updateScore(Score score) {
        return scoreMapper.updateScore(score);
    }

    @Override
    public Integer searchScoreBySubjectName(Score score) {
        return scoreMapper.searchScoreBySubjectName(score);
    }

    @Override
    public Double selectSumScore(String stuId) {
        return scoreMapper.selectSumScore(stuId);
    }

    @Override
    public List<Score> selectAllScoreByNo(Map<String, Object> map) {
        return scoreMapper.selectAllScoreByNo(map);
    }

    @Override
    public long selectAllcountScoreByNo(Map<String,Object> map) {
        return scoreMapper.selectAllcountScoreByNo(map);
    }

    @Override
    public int updateScore1(Score score) {
        return scoreMapper.updateScore1(score);
    }

    public void setScoreMapper(ScoreMapper scoreMapper) {
        this.scoreMapper = scoreMapper;
    }
}
